#ifndef USER_MANAGER_H
#define USER_MANAGER_H

#include <string>
#include <map>
#include <vector>

class UserManager {
public:
    UserManager();
    ~UserManager();

    // User registration
    bool registerUser(const std::string& username, const std::string& password,
                     const std::string& phone, const std::string& email);
    
    // User login verification
    bool loginUser(const std::string& username, const std::string& password, int& user_id);
    
    // Get user information
    bool getUserInfo(int user_id, std::map<std::string, std::string>& user_info);
    
    // Update user information
    bool updateUserInfo(int user_id, const std::map<std::string, std::string>& user_info);
    
    // Password encryption
    std::string encryptPassword(const std::string& password);
    
    // Verify password
    bool verifyPassword(const std::string& password, const std::string& encrypted_password);
    
    // Generate session ID
    std::string generateSessionId(int user_id);
    
    // Validate session
    bool validateSession(const std::string& session_id, int& user_id);

private:
    // Generate random string
    std::string generateRandomString(int length);
    
    // Get current timestamp
    std::string getCurrentTimestamp();
};

#endif // USER_MANAGER_H